<div class="pageContent">
	
	<form method="post" action="<?php echo Yii::app()->createUrl('adver/edit');?>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<input type="hidden" name="id" value="<?php echo $data['adver_id'];?>" />
		<input type="hidden" name="type" value="<?php echo $type;?>" />
		<div class="pageFormContent" layoutH="58">

			<div class="unit">
				<label>广告名称：</label>
				<input type="text" name="dataForm[name]" maxlength="30" class="required" errormsg="请输入广告名称" value="<?php echo $data['name'];?>"/>
			</div>
			<div class="unit">
				<label>广告分类：</label>
				<select class="combox" name="dataForm[adver_type]">
					<?php if($type == 'index'){?>
					<option value="0" <?php if($data['adver_type'] == 0){?>selected<?php }?>>首页焦点</option>
					<?php }else{?>
					<option value="1" <?php if($data['adver_type'] == 1){?>selected<?php }?>>自由行</option>
					<option value="3" <?php if($data['adver_type'] == 3){?>selected<?php }?>>行程定制</option>
					<option value="4" <?php if($data['adver_type'] == 4){?>selected<?php }?>>登录注册</option>
					<option value="5" <?php if($data['adver_type'] == 5){?>selected<?php }?>>加入我们</option>
					<?php }?>
				</select>
			</div>
			<div class="unit">
				<label>排序：</label>
				<input type="text" name="dataForm[sort]" class="digits required" errormsg="请输入排序(整数)" value="<?php echo $data['sort'];?>"/>
				<span class="info">&nbsp;&nbsp;数字越大越靠前</span>
			</div>
			<div class="unit">
				<label>连接地址：</label>
				<input type="text" name="dataForm[link_url]" class="required" errormsg="请输入连接地址" value="<?php echo $data['link_url'];?>"/>
			</div>
			<div class="unit">
				<label>开始时间：</label>
				<input type="text" name="dataForm[start_time]" class="date required" size="30" errormsg="请输入广告开始时间" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" value="<?php echo $data['start_time'];?>"/><a class="inputDateButton" href="javascript:;">选择</a>
			</div>
			<div class="unit">
				<label>结束时间：</label>
				<input type="text" name="dataForm[end_time]" class="date required" size="30" errormsg="请输入广告结束时间" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true" value="<?php echo $data['end_time'];?>"/><a class="inputDateButton" href="javascript:;">选择</a>
			</div>
			<div class="unit">
				<label>是否显示：</label>
				<label><input type="radio" name="dataForm[is_show]" value="0" <?php if($data['is_show'] == 0){?>checked<?php }?>/>显示</label>
				<label><input type="radio" name="dataForm[is_show]" value="1" <?php if($data['is_show'] == 1){?>checked<?php }?>/>隐藏</label>
			</div>
			<div class="unit">
				<dl>
					<label>广告图片：</label>
					<dd>
						<input type="file" id="uploadify1" class="input-xlarge" name="uploadify" style="margin-left:100px;">	
						<input type="hidden" id="ad_img_path1" name="dataForm[image]" class="required" value="<?php echo $data['image'];?>" errormsg="请选择上传的图片">
					</dd>
				</dl>
			</div>
			<br/><br/>
			<div class="unit" id="image_play1">
				<br/><br/>
				<dl>
					<label>图片预览：</label>
					<dd>
						<div style="width:560px;height:200px;float:left;margin-left:10px;">
						<div style="width:460px;height:200px;float:left;">
						<img style="width:100%;height:100%" src="<?php echo $data['image'];?>">
						</div>&nbsp;
						<span id="delbutton1"  style="cursor: pointer; color: red; margin-left: 2px; width: 50px; float: left;" alt="删除" title="删除">[ 删除 ]</span>
						</div>
					</dd>
				</dl>
				<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
			</div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
<?php $this->beginWidget('application.widget.tools.uploadjs', array('uploadCount'=>1)); ?>
<?php $this->endWidget(); ?>